package com.wsc.indexer.utils;


/*
 * this class contains formatted HTML that is to be returned for client request. 
 */
public class HtmlData {

	
	// If no key-value pair is appeared in the given request then return following HTML.
	
	
	
	public static String getWelcomeHTML(){

	StringBuffer sb=new StringBuffer();
	
	sb.append("<html>");
	sb.append("<head></head>");
	sb.append("<body>");
	sb.append("<h3>");
	sb.append("Welcome to Indexer server.");
	sb.append("</h3>");
	
	sb.append("<h2>");
	sb.append("Following Options are available with Indexer Server ");
	sb.append("</h2>");
	sb.append("<ul>");

	sb.append("<li>");
	sb.append("operation");
	sb.append("<ul>");
	
	sb.append("<li>");
	sb.append("index");
	sb.append("</li>");
	
	sb.append("<li>");
	sb.append("vstatus");
	sb.append("</li>");
	
	sb.append("</ul>");
	sb.append("</li>");
	
	sb.append("<li>");
	sb.append("url");
	sb.append("<ul>");
	sb.append("<li>");
	sb.append("url to be Index/check status");
	sb.append("</li>");
	sb.append("</ul>");
	sb.append("</li>");
	
	sb.append("</li>");
	sb.append("</ur>");
	sb.append("</body>");
	sb.append("</html>");
	return sb.toString();
}
	
	
	//If the parameter operation value is not in IndexerOpeartion constants then return this HTML.
	
	public static String getOperationValueNotSupported(String value){
		
	String HTML="<html>" +
				"<head></head>" +
				"<body>" +
				"<h1>Parameter value("+value+ ") is not Defined</h1>" +
				"</body>" +
				"</html>";
		
		
				return HTML;
	}
	
	
	public static String getOperationNotSupported(String name){
		
		String HTML="<html>" +
				"<head></head>" +
				"<body>" +
				"<h1>Parameter ("+name+") is not supported</h1>" +
				"</body>" +
				"</html>";
		
		
				return HTML;
	}
	
}
